home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / unixasy.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  2KB  |  54 lines

  1. /* Various I/O definitions specific to asynch I/O on Unix */
  2. #ifndef    _UNIXASY_H
  3. #define    _UNIXASY_H
  4.  
  5. #ifndef    _MBUF_H
  6. #include "mbuf.h"
  7. #endif
  8.  
  9. #ifndef _PROC_H
  10. #include "proc.h"
  11. #endif
  12.  
  13. #ifndef    _IFACE_H
  14. #include "iface.h"
  15. #endif
  16.  
  17. /* Asynch controller control block */
  18. struct asy
  19. {
  20.     struct iface *iface;
  21.     struct mbuf *sndq;        /* Transmit queue */
  22.     struct mbuf *rcvq;        /* Receive queue */
  23.     struct proc *rxproc;    /* Low-level receive process */
  24.     int fd;            /* Fildes for tty device */
  25.     char uulock[60];        /* UUCP lock file name */
  26.     long speed;            /* port speed */
  27.     unsigned short flags;    /* various flags */
  28. #define ASY_RTSCTS    0x01    /*   RTS/CTS enabled */
  29. #define ASY_CARR    0x02    /*   DCD detection (not implemented) */
  30.     unsigned char pktsize;    /* nonblocking or termios VMIN (blocking) */
  31.     unsigned long rxints;    /* simulated rx interrupts */
  32.     unsigned long txints;    /* simulated tx interrupts */
  33.     unsigned long rxchar;    /* Received characters */
  34.     unsigned long txchar;    /* Transmitted characters */
  35. /* new parameters for asy tuning */
  36.     unsigned rxbuf;        /* chars to read at once */
  37.     int rxq;            /* number of reads before sleeping */
  38.     int txq;            /* number of writes before sleeping */
  39. /* new status values */
  40.     long rxput;            /* number of puts to asy rx */
  41.     long rxovq;            /* number of times rxq full */
  42.     long rxblock;        /* number of false (EWOULDBLOCK) reads */
  43.     long txget;            /* number of gets from tx queue */
  44.     long txovq;            /* number of times txq full */
  45.     long txblock;        /* number of EWOULDBLOCK writes */
  46. };
  47.  
  48. extern int Nasy;        /* Actual number of asynch lines */
  49. extern struct asy Asy[];
  50.  
  51. extern int carrier_detect __ARGS((int));
  52.  
  53. #endif    /* _UNIXASY_H */
  54.